<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PatientViewDlg" widgetVar="PatientViewDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.ViewPatientTitle}">

            <h:form id="PatientViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{patientController.selected != null}">

                        <h:outputText value="#{myBundle.ViewPatientLabel_pid}"/>
                        <h:outputText value="#{patientController.selected.pid}" title="#{myBundle.ViewPatientTitle_pid}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_cnic}"/>
                        <h:outputText value="#{patientController.selected.cnic}" title="#{myBundle.ViewPatientTitle_cnic}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_fname}"/>
                        <h:outputText value="#{patientController.selected.fname}" title="#{myBundle.ViewPatientTitle_fname}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_lname}"/>
                        <h:outputText value="#{patientController.selected.lname}" title="#{myBundle.ViewPatientTitle_lname}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_careOf}"/>
                        <h:outputText value="#{patientController.selected.careOf}" title="#{myBundle.ViewPatientTitle_careOf}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_gender}"/>
                        <h:outputText value="#{patientController.selected.gender}" title="#{myBundle.ViewPatientTitle_gender}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_dob}"/>
                        <h:outputText value="#{patientController.selected.dob}" title="#{myBundle.ViewPatientTitle_dob}">
                            <f:convertDateTime pattern="MM/dd/yyyy" />
                        </h:outputText>

                        <h:outputText value="#{myBundle.ViewPatientLabel_hno}"/>
                        <h:outputText value="#{patientController.selected.hno}" title="#{myBundle.ViewPatientTitle_hno}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_street}"/>
                        <h:outputText value="#{patientController.selected.street}" title="#{myBundle.ViewPatientTitle_street}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_town}"/>
                        <h:outputText value="#{patientController.selected.town}" title="#{myBundle.ViewPatientTitle_town}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_city}"/>
                        <h:outputText value="#{patientController.selected.city}" title="#{myBundle.ViewPatientTitle_city}"/>

                        <h:outputText value="#{myBundle.ViewPatientLabel_contact}"/>
                        <h:outputText value="#{patientController.selected.contact}" title="#{myBundle.ViewPatientTitle_contact}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{myBundle.Close}" onclick="PatientViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
